package com.cqwu.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * CmAnswer entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cm_answer", catalog = "common")
public class CmAnswer implements java.io.Serializable {

	// Fields

	private Integer id;
	private Integer surveyId;
	private Integer questionId;
	private short answer;
	private short gender;
	private String major;
	private Integer age;
	private boolean isShow;

	// Constructors

	/** default constructor */
	public CmAnswer() {
	}

	/** minimal constructor */
	public CmAnswer(Integer surveyId, Integer questionId, short answer) {
		this.surveyId = surveyId;
		this.questionId = questionId;
		this.answer = answer;
	}

	/** full constructor */
	public CmAnswer(Integer surveyId, Integer questionId, short answer,
			short gender, String major, Integer age, boolean isShow) {
		this.surveyId = surveyId;
		this.questionId = questionId;
		this.answer = answer;
		this.gender = gender;
		this.major = major;
		this.age = age;
		this.isShow = isShow;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "surveyID", nullable = false)
	public Integer getSurveyId() {
		return this.surveyId;
	}

	public void setSurveyId(Integer surveyId) {
		this.surveyId = surveyId;
	}

	@Column(name = "questionID", nullable = false)
	public Integer getQuestionId() {
		return this.questionId;
	}

	public void setQuestionId(Integer questionId) {
		this.questionId = questionId;
	}

	@Column(name = "answer", nullable = false)
	public short getAnswer() {
		return this.answer;
	}

	public void setAnswer(short answer) {
		this.answer = answer;
	}

	@Column(name = "gender")
	public short getGender() {
		return this.gender;
	}

	public void setGender(short gender) {
		this.gender = gender;
	}

	@Column(name = "major", length = 20)
	public String getMajor() {
		return this.major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	@Column(name = "age")
	public Integer getAge() {
		return this.age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	@Column(name = "isShow")
	public boolean getIsShow() {
		return this.isShow;
	}

	public void setIsShow(boolean isShow) {
		this.isShow = isShow;
	}

}